package com.coldchain.common.util;
import com.coldchain.common.constant.RedisKeyConstants;
import com.fangliai.core.constants.CommonConstants;

import java.util.Date;

/**
 *  用户相关的绶存key解析工具类
 * @ClassName RedisKeyUtil

 * @Author fangliai
 * @Date 2018/8/29 9:17
 * @Vesion 1
 **/
public class RedisKeyUtil {
    /**
     *
     * @param userId
     * @param expire
     * @return
     */
    public static String buildUserAbleKey(String userId,Date expire){
        return CommonConstants.REDIS_USER_TOKEN + RedisKeyConstants.USER_ABLE + userId + ":" + expire.getTime();
    }

    /**
     * 
     * @param userId
     * @param expire
     * @return
     */
    public static String buildUserDisableKey(String userId,Date expire){
        return CommonConstants.REDIS_USER_TOKEN + RedisKeyConstants.USER_DISABLE + userId + ":" + expire.getTime();
    }
}
